//
//  BaseViewController.h
//  YiBaoStore
//
//  Created by 毛云河 on 2018/10/1.
//  Copyright © 2018年 小河. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/*
 拍照的回调
 */
typedef void (^DidSelectTakePhotoBlock)(UIImage *image);

@interface BaseViewController : UIViewController

@property UIButton *leftBtn;//左按钮
@property UIButton *rightBtn;//右按钮
@property UIImageView *leftIcon;//左图标
@property UIImageView *rightIcon;//右图标
@property UIView *bgNavView;//导航背景
@property UILabel *titLabel;//导航标题

@property (nonatomic,copy) DidSelectTakePhotoBlock photoBlock;

/*
 *右导航点击事件
 */
- (void)rightBtnClick:(UIButton *)sender;

/**
 *设置导航栏
 */
- (void)setNaviWith:(NSString *)name;

/*
 HUD
 */
- (void)ShowHUDWithMessage:(NSString *)message;
- (void)showHUDStyleSolidColor;
- (void)hideHUD;
/*
 *拍照
 */
- (void)takePhoto;

/**
 判断店铺状态
 */
- (void)changeShopState;



/*
 *友盟分享图片到微信好友或者朋友圈
 */
- (void)sharkImageUMWith:(NSInteger)inter withImage:(UIImage *)image;

/*
 *友盟分享网页到微信好友或者朋友圈
 */
- (void)shareHtmlWithType:(NSInteger)shareType title:(NSString *)title descr:(NSString *)descr imageUrl:(NSString *)imageurl shareURL:(NSString *)shareURL;

/**
 *保存图片到相册
 */
- (void)saveImageToPhotos:(UIImage*)savedImage;

/**
 *以图片中心为中心，以最小边为边长，裁剪正方形图片
 */
-(UIImage *)cropSquareImage:(UIImage *)image;

@end

NS_ASSUME_NONNULL_END
